/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * tarefaNova.java
 *
 * Created on Nov 15, 2010, 12:43:43 PM
 */
package NajaTaskClient.interfaces.gerente;

import javax.swing.JDialog;

/**
 *
 * @author Nidorx
 */
public class tarefaNova extends javax.swing.JDialog {

    atividadeSelecionar dialogAtividadeSelecionar;
    usuarioSelecionar dialogUsuarioSelecionar;
    grupoSelecionar dialogGrupoSelecionar;

    private void inicializar() {
        this.textPermissaoGrupo.setEnabled(false);
        this.buttonPermissaoSelecionarGrupo.setEnabled(false);
        this.textPermissaoUsuario.setEnabled(false);
        this.buttonPermissaoSelecionarUsuario.setEnabled(false);
    }

    /** Creates new form tarefaNova */
    public tarefaNova(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        dialogAtividadeSelecionar = new atividadeSelecionar(parent, true);
        dialogUsuarioSelecionar = new usuarioSelecionar(parent, true);
        dialogGrupoSelecionar = new grupoSelecionar(parent, true);
        initComponents();
        this.setLocationRelativeTo(getRootPane());
        this.inicializar();
    }

    public void criarTarefaPorAtividade(String codigoAtividade) {
        this.setVisible(true);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroupPermissao = new javax.swing.ButtonGroup();
        jPanelPrincipal = new javax.swing.JPanel();
        jLabelProjeto = new javax.swing.JLabel();
        comboProjeto = new javax.swing.JComboBox();
        jLabelAtividade = new javax.swing.JLabel();
        textAtividade = new javax.swing.JTextField();
        buttonAtividadeSelecionar = new javax.swing.JButton();
        jLabelDataInicio = new javax.swing.JLabel();
        textDataInicio = new javax.swing.JFormattedTextField();
        jLabelDataFim = new javax.swing.JLabel();
        textDataFim = new javax.swing.JFormattedTextField();
        checkDataFimIndeterminado = new javax.swing.JCheckBox();
        jLabelTituloTarefa = new javax.swing.JLabel();
        textTitulo = new javax.swing.JTextField();
        jLabelDescricaoTarefa = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        areaDescricao = new javax.swing.JTextArea();
        jLabelPrioridadeTarefa = new javax.swing.JLabel();
        comboPrioridade = new javax.swing.JComboBox();
        jLabelPalavraChave = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        areaPalavrasChave = new javax.swing.JTextArea();
        buttonCriar = new javax.swing.JButton();
        buttonCancelar = new javax.swing.JButton();
        jPanelPermissao = new javax.swing.JPanel();
        jRadioPermissaoUsuario = new javax.swing.JRadioButton();
        jRadioPermissaoTodos = new javax.swing.JRadioButton();
        jRadioPermissaoGrupo = new javax.swing.JRadioButton();
        textPermissaoUsuario = new javax.swing.JTextField();
        buttonPermissaoSelecionarUsuario = new javax.swing.JButton();
        textPermissaoGrupo = new javax.swing.JTextField();
        buttonPermissaoSelecionarGrupo = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanelPrincipal.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabelProjeto.setText("Projeto");

        comboProjeto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "- Selecione -", "My Mine Finance", "Java Tarefas" }));

        jLabelAtividade.setText("Atividade");

        textAtividade.setEditable(false);
        textAtividade.setEnabled(false);

        buttonAtividadeSelecionar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/NajaTaskClient/recursos/icons/activity.png"))); // NOI18N
        buttonAtividadeSelecionar.setText("Selecionar");
        buttonAtividadeSelecionar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonAtividadeSelecionarActionPerformed(evt);
            }
        });

        jLabelDataInicio.setText("Data de início");

        jLabelDataFim.setText("Data de fim");

        checkDataFimIndeterminado.setText("Fim indeterminado");
        checkDataFimIndeterminado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkDataFimIndeterminadoActionPerformed(evt);
            }
        });

        jLabelTituloTarefa.setText("Título da tarefa");

        jLabelDescricaoTarefa.setText("Descrição da tarefa");

        areaDescricao.setColumns(20);
        areaDescricao.setRows(5);
        jScrollPane1.setViewportView(areaDescricao);

        jLabelPrioridadeTarefa.setText("Prioridade");

        comboPrioridade.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Muito baixo", "Baixo", "Normal", "Alto", "Muito alto" }));

        jLabelPalavraChave.setText("Palavras-chave");

        areaPalavrasChave.setColumns(20);
        areaPalavrasChave.setRows(5);
        jScrollPane2.setViewportView(areaPalavrasChave);

        buttonCriar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/NajaTaskClient/recursos/icons/add.png"))); // NOI18N
        buttonCriar.setText("Criar");

        buttonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/NajaTaskClient/recursos/icons/cancel.png"))); // NOI18N
        buttonCancelar.setText("Cancelar");
        buttonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCancelarActionPerformed(evt);
            }
        });

        jPanelPermissao.setBorder(javax.swing.BorderFactory.createTitledBorder("Quem pode executar essa tarefa ?"));

        buttonGroupPermissao.add(jRadioPermissaoUsuario);
        jRadioPermissaoUsuario.setText("Usuário específico");
        jRadioPermissaoUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioPermissaoUsuarioActionPerformed(evt);
            }
        });

        buttonGroupPermissao.add(jRadioPermissaoTodos);
        jRadioPermissaoTodos.setSelected(true);
        jRadioPermissaoTodos.setText("Todos");
        jRadioPermissaoTodos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioPermissaoTodosActionPerformed(evt);
            }
        });

        buttonGroupPermissao.add(jRadioPermissaoGrupo);
        jRadioPermissaoGrupo.setText("Grupo de usuários específico");
        jRadioPermissaoGrupo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioPermissaoGrupoActionPerformed(evt);
            }
        });

        textPermissaoUsuario.setEditable(false);

        buttonPermissaoSelecionarUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/NajaTaskClient/recursos/icons/user.png"))); // NOI18N
        buttonPermissaoSelecionarUsuario.setText("Selecionar");
        buttonPermissaoSelecionarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonPermissaoSelecionarUsuarioActionPerformed(evt);
            }
        });

        textPermissaoGrupo.setEditable(false);
        textPermissaoGrupo.setEnabled(false);

        buttonPermissaoSelecionarGrupo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/NajaTaskClient/recursos/icons/group.png"))); // NOI18N
        buttonPermissaoSelecionarGrupo.setText("Selecionar");
        buttonPermissaoSelecionarGrupo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonPermissaoSelecionarGrupoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelPermissaoLayout = new javax.swing.GroupLayout(jPanelPermissao);
        jPanelPermissao.setLayout(jPanelPermissaoLayout);
        jPanelPermissaoLayout.setHorizontalGroup(
            jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelPermissaoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRadioPermissaoTodos)
                    .addComponent(jRadioPermissaoUsuario)
                    .addComponent(jRadioPermissaoGrupo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(textPermissaoUsuario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE)
                    .addComponent(textPermissaoGrupo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(buttonPermissaoSelecionarGrupo, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(buttonPermissaoSelecionarUsuario, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanelPermissaoLayout.setVerticalGroup(
            jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelPermissaoLayout.createSequentialGroup()
                .addComponent(jRadioPermissaoTodos)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioPermissaoUsuario)
                    .addComponent(textPermissaoUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonPermissaoSelecionarUsuario))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPermissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioPermissaoGrupo)
                    .addComponent(textPermissaoGrupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonPermissaoSelecionarGrupo))
                .addContainerGap(29, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelPrincipalLayout = new javax.swing.GroupLayout(jPanelPrincipal);
        jPanelPrincipal.setLayout(jPanelPrincipalLayout);
        jPanelPrincipalLayout.setHorizontalGroup(
            jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelProjeto)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelPrincipalLayout.createSequentialGroup()
                        .addComponent(buttonCancelar)
                        .addGap(18, 18, 18)
                        .addComponent(buttonCriar))
                    .addGroup(jPanelPrincipalLayout.createSequentialGroup()
                        .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelAtividade)
                            .addGroup(jPanelPrincipalLayout.createSequentialGroup()
                                .addComponent(jLabelDataInicio)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(textAtividade, javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanelPrincipalLayout.createSequentialGroup()
                                        .addComponent(textDataInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabelDataFim)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(textDataFim, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(checkDataFimIndeterminado))
                                    .addComponent(comboProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonAtividadeSelecionar))
                    .addComponent(jPanelPermissao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanelPrincipalLayout.createSequentialGroup()
                        .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelPrioridadeTarefa)
                            .addComponent(jLabelPalavraChave))
                        .addGap(29, 29, 29)
                        .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(comboPrioridade, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 587, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelPrincipalLayout.createSequentialGroup()
                        .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelDescricaoTarefa)
                            .addComponent(jLabelTituloTarefa))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(textTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, 592, Short.MAX_VALUE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 592, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanelPrincipalLayout.setVerticalGroup(
            jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelProjeto)
                    .addComponent(comboProjeto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelAtividade)
                    .addComponent(textAtividade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonAtividadeSelecionar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelDataInicio)
                    .addComponent(textDataInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelDataFim)
                    .addComponent(textDataFim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(checkDataFimIndeterminado))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelPermissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelTituloTarefa)
                    .addComponent(textTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelDescricaoTarefa)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelPrioridadeTarefa)
                    .addComponent(comboPrioridade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelPalavraChave)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(buttonCriar)
                    .addComponent(buttonCancelar))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonAtividadeSelecionarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAtividadeSelecionarActionPerformed
        this.atividadeSelecionar();
    }//GEN-LAST:event_buttonAtividadeSelecionarActionPerformed

    private void jRadioPermissaoTodosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioPermissaoTodosActionPerformed
        this.textPermissaoGrupo.setEnabled(false);
        this.buttonPermissaoSelecionarGrupo.setEnabled(false);
        this.textPermissaoUsuario.setEnabled(false);
        this.buttonPermissaoSelecionarUsuario.setEnabled(false);
    }//GEN-LAST:event_jRadioPermissaoTodosActionPerformed

    private void jRadioPermissaoUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioPermissaoUsuarioActionPerformed
        /*ativa o botao de selecionar usuario */
        this.textPermissaoUsuario.setEnabled(true);
        this.buttonPermissaoSelecionarUsuario.setEnabled(true);

        /* e desativa o botao de selecionar grupo*/
        this.textPermissaoGrupo.setEnabled(false);
        this.buttonPermissaoSelecionarGrupo.setEnabled(false);

    }//GEN-LAST:event_jRadioPermissaoUsuarioActionPerformed

    private void jRadioPermissaoGrupoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioPermissaoGrupoActionPerformed
        /* ativa o botao de selecionar grupo*/
        this.textPermissaoGrupo.setEnabled(true);
        this.buttonPermissaoSelecionarGrupo.setEnabled(true);

        /* e desativa o botao de selecionar usuario*/
        this.textPermissaoUsuario.setEnabled(false);
        this.buttonPermissaoSelecionarUsuario.setEnabled(false);
    }//GEN-LAST:event_jRadioPermissaoGrupoActionPerformed

    private void checkDataFimIndeterminadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkDataFimIndeterminadoActionPerformed
        if (checkDataFimIndeterminado.isSelected()) {
            this.textDataFim.setEnabled(false);
        } else {
            this.textDataFim.setEnabled(true);
        }
    }//GEN-LAST:event_checkDataFimIndeterminadoActionPerformed

    private void buttonPermissaoSelecionarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPermissaoSelecionarUsuarioActionPerformed
        this.usuarioSelecionar();
    }//GEN-LAST:event_buttonPermissaoSelecionarUsuarioActionPerformed

    private void buttonPermissaoSelecionarGrupoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPermissaoSelecionarGrupoActionPerformed
         this.grupoSelecionar();
    }//GEN-LAST:event_buttonPermissaoSelecionarGrupoActionPerformed

    private void buttonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCancelarActionPerformed
        this.dispose();
    }//GEN-LAST:event_buttonCancelarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                tarefaNova dialog = new tarefaNova(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    private void atividadeSelecionar() {
        dialogAtividadeSelecionar.obterAtividade("25");
    }

    private void usuarioSelecionar() {
        dialogUsuarioSelecionar.obterUsario();
    }

    private void grupoSelecionar() {
        dialogGrupoSelecionar.obterGrupo();
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea areaDescricao;
    private javax.swing.JTextArea areaPalavrasChave;
    private javax.swing.JButton buttonAtividadeSelecionar;
    private javax.swing.JButton buttonCancelar;
    private javax.swing.JButton buttonCriar;
    private javax.swing.ButtonGroup buttonGroupPermissao;
    private javax.swing.JButton buttonPermissaoSelecionarGrupo;
    private javax.swing.JButton buttonPermissaoSelecionarUsuario;
    private javax.swing.JCheckBox checkDataFimIndeterminado;
    private javax.swing.JComboBox comboPrioridade;
    private javax.swing.JComboBox comboProjeto;
    private javax.swing.JLabel jLabelAtividade;
    private javax.swing.JLabel jLabelDataFim;
    private javax.swing.JLabel jLabelDataInicio;
    private javax.swing.JLabel jLabelDescricaoTarefa;
    private javax.swing.JLabel jLabelPalavraChave;
    private javax.swing.JLabel jLabelPrioridadeTarefa;
    private javax.swing.JLabel jLabelProjeto;
    private javax.swing.JLabel jLabelTituloTarefa;
    private javax.swing.JPanel jPanelPermissao;
    private javax.swing.JPanel jPanelPrincipal;
    private javax.swing.JRadioButton jRadioPermissaoGrupo;
    private javax.swing.JRadioButton jRadioPermissaoTodos;
    private javax.swing.JRadioButton jRadioPermissaoUsuario;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextField textAtividade;
    private javax.swing.JFormattedTextField textDataFim;
    private javax.swing.JFormattedTextField textDataInicio;
    private javax.swing.JTextField textPermissaoGrupo;
    private javax.swing.JTextField textPermissaoUsuario;
    private javax.swing.JTextField textTitulo;
    // End of variables declaration//GEN-END:variables
}
